home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2935 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: news.genie.net!usenet
  2. From: i.einman@genie.com (IAN J. EINMAN)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: How to patch workbench to show fakeicons??
  5. Date: 7 Feb 1996 07:14:22 GMT
  6. Organization: via GEnie Services (1-800-638-9636 or info@genie.com)
  7. Sender: i.einman@genie.com (IAN J. EINMAN)
  8. Message-ID: <4f9jge$ll6@rock101.genie.net>
  9. NNTP-Posting-Host: rock103.is.ge.com
  10.  
  11. >>I'm trying to patch Workbench to make it show fakeicons instead of normal
  12. deficons (like iconchief and deficons do). I've tried to patch the
  13. GetDiskObject function, hoping the workbench uses it, but no result. I think
  14. the workbench uses some private function (maybe in icon.library). Can someone
  15. help me? Thank you!!!
  16.  
  17. Sure can.  You need to patch GetIcon and PutIcon.
  18.  
  19. GetIcon: offset -42
  20. proto: GetIcon(char *name, struct DiskObject *icon, struct FreeList *fl)
  21.                   a0             a1                     a2
  22.  
  23. PutIcon: offset -48
  24. proto: PutIcon(char *name, struct DiskObject *icon)
  25.                    a0               a1
  26.  
  27. These functions are PRIVATE now, but are documented in old intuition manuals.
  28. I've done this before, so I have examples but they are in assembly and not
  29. very easy to read at that.
  30.  
  31. Basically when you patch in there, you want to stick yourself right after the
  32. Workbench calls GetIcon.  It has allocated a DO and FL structure already.
  33. You lock the name +.info to see if it is there.  If not, substitute your
  34. icon for "name".  It is a piece of CAKE.
  35.  
  36.